module.exports=function(req,res,next){
  res.locals.message = err.message;
  res.locals.error = req.app.get('env') === 'development' ? err : {};

  if(res.cookies.id!=''){
    res.redirect('/login');
  }else{
    next();
  }
}
